/*
 * motor.h
 *
 *  Created on: May 21, 2025
 *      Author: lsy18
 */

#ifndef HARDWARE_MOTOR_MOTOR_H_
#define HARDWARE_MOTOR_MOTOR_H_

#include <stdint.h>

#include "tim.h"

#include "../Communicate/Uart_slave/uart_slave.h"

#define htim_pwm htim3

#define motor_pwm_min 4
#define motor_pwm_max 11

#define motor_pwm_com 1000

typedef enum
{
	MOTOR_LEFT = TIM_CHANNEL_2,
	MOTOR_RIGHT = TIM_CHANNEL_1
}MOTOR_SELECT;


void motor_init();
void motor_control_single(uint16_t pwm_duty , MOTOR_SELECT motor_select);
void motor_control();

#endif /* HARDWARE_MOTOR_MOTOR_H_ */
